/**
 *  Copyright (C) 2021 FISCO BCOS.
 *  SPDX-License-Identifier: Apache-2.0
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 * @file AuthInitializer.h
 * @author: kyonRay
 * @date 2021-11-24
 */

#pragma once
#include "libinitializer/ProtocolInitializer.h"
#include <bcos-codec/abi/ContractABICodec.h>
#include <bcos-framework/interfaces/dispatcher/SchedulerInterface.h>
#include <bcos-framework/interfaces/executor/PrecompiledTypeDef.h>
#include <bcos-framework/interfaces/ledger/LedgerConfig.h>
#include <bcos-tool/NodeConfig.h>
#include <bcos-utilities/Common.h>

using namespace bcos;
using namespace bcos::tool;
using namespace bcos::initializer;
namespace bcos::initializer
{
// clang-format off
static const char* committeeBin = "60806040523480156200001157600080fd5b506040516200643b3803806200643b833981810160405260808110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660208202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015620000c6578082015181840152602081019050620000a9565b5050505090500160405260200180516040519392919084640100000000821115620000f057600080fd5b838201915060208201858111156200010757600080fd5b82518660208202830111640100000000821117156200012557600080fd5b8083526020830192505050908051906020019060200280838360005b838110156200015e57808201518184015260208101905062000141565b505050509050016040526020018051906020019092919080519060200190929190505050611005600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083838383604051620001d790620003e7565b8080602001806020018560ff1660ff1681526020018460ff1660ff168152602001838103835287818151815260200191508051906020019060200280838360005b838110156200023557808201518184015260208101905062000218565b50505050905001838103825286818151815260200191508051906020019060200280838360005b83811015620002795780820151818401526020810190506200025c565b505050509050019650505050505050604051809103906000f080158015620002a5573d6000803e3d6000fd5b506000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550306000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516200031690620003f5565b808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050604051809103906000f0801580156200039c573d6000803e3d6000fd5b50600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000403565b611f1980620026c383390190565b611e5f80620045dc83390190565b6122b080620004136000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80637475f00f116100715780637475f00f146102d857806385a6a0911461035a578063bcfb9b6114610388578063d978ffba146103c2578063e43581b81461040a578063f675fdaa14610466576100b4565b806303f19159146100b9578063185c1587146101155780632158671f1461015f5780633234f0e6146101a9578063614235f31461021b5780636ba4790c1461026a575b600080fd5b6100ff600480360360608110156100cf57600080fd5b81019080803560ff169060200190929190803560ff169060200190929190803590602001909291905050506104b0565b6040518082815260200191505060405180910390f35b61011d610726565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61016761074b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610205600480360360608110156101bf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803563ffffffff16906020019092919080359060200190929190505050610771565b6040518082815260200191505060405180910390f35b6102546004803603604081101561023157600080fd5b81019080803560ff169060200190929190803590602001909291905050506108f4565b6040518082815260200191505060405180910390f35b6102c26004803603606081101561028057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080351515906020019092919080359060200190929190505050610b70565b6040518082815260200191505060405180910390f35b610344600480360360608110156102ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cf3565b6040518082815260200191505060405180910390f35b6103866004803603602081101561037057600080fd5b8101908080359060200190929190505050611078565b005b6103c06004803603604081101561039e57600080fd5b81019080803590602001909291908035151590602001909291905050506111b7565b005b6103ee600480360360208110156103d857600080fd5b8101908080359060200190929190505050611c72565b604051808260ff1660ff16815260200191505060405180910390f35b61044c6004803603602081101561042057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c9f565b604051808215151515815260200191505060405180910390f35b61046e611d81565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006104bb33611c9f565b61052d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f796f75206d75737420626520676f7665726e6f7200000000000000000000000081525060200191505060405180910390fd5b60008460ff1610158015610545575060648460ff1611155b61059a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806122266021913960400191505060405180910390fd5b60008360ff16101580156105b2575060648360ff1611155b610624576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f696e76616c69642072616e6765206f662077696e52617465000000000000000081525060200191505060405180910390fd5b606080600267ffffffffffffffff8111801561063f57600080fd5b5060405190808252806020026020018201604052801561066e5781602001602082028036833780820191505090505b509050858160008151811061067f57fe5b602002602001019060ff16908160ff168152505084816001815181106106a157fe5b602002602001019060ff16908160ff16815250506106bd611fef565b6040518060c00160405280600c60ff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001838152602001600063ffffffff16815260200184815260200160001515815250905061071a8186611da7565b93505050509392505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061077c33611c9f565b6107ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f796f75206d75737420626520676f7665726e6f7200000000000000000000000081525060200191505060405180910390fd5b6060600167ffffffffffffffff8111801561080857600080fd5b506040519080825280602002602001820160405280156108375781602001602082028036833780820191505090505b5090506060858260008151811061084a57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061088c611fef565b6040518060c00160405280600b60ff1681526020018873ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018763ffffffff1681526020018481526020016001151581525090506108e88186611da7565b93505050509392505050565b60006108ff33611c9f565b610971576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f796f75206d75737420626520676f7665726e6f7200000000000000000000000081525060200191505060405180910390fd5b8260ff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631749bea96040518163ffffffff1660e01b815260040160206040518083038186803b1580156109dd57600080fd5b505afa1580156109f1573d6000803e3d6000fd5b505050506040513d6020811015610a0757600080fd5b81019080805190602001909291905050501415610a6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b8152602001806121eb603b913960400191505060405180910390fd5b606080600167ffffffffffffffff81118015610a8a57600080fd5b50604051908082528060200260200182016040528015610ab95781602001602082028036833780820191505090505b5090508481600081518110610aca57fe5b602002602001019060ff16908160ff1681525050610ae6611fef565b6040518060c00160405280601560ff168152602001600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001600063ffffffff168152602001848152602001600015158152509050610b658186611da7565b935050505092915050565b6000610b7b33611c9f565b610bed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f796f75206d75737420626520676f7665726e6f7200000000000000000000000081525060200191505060405180910390fd5b6060600167ffffffffffffffff81118015610c0757600080fd5b50604051908082528060200260200182016040528015610c365781602001602082028036833780820191505090505b5090508481600081518110610c4757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506060610c8b611fef565b6040518060c00160405280601660ff1681526020018873ffffffffffffffffffffffffffffffffffffffff168152602001838152602001600063ffffffff1681526020018481526020018715158152509050610ce78186611da7565b93505050509392505050565b6000610cfe33611c9f565b610d70576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f796f75206d75737420626520676f7665726e6f7200000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e13576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f636f6e747261637420616464726573206e6f74206578697374732e000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166364efb22b846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610eb257600080fd5b505afa158015610ec6573d6000803e3d6000fd5b505050506040513d6020811015610edc57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610f71576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806122476034913960400191505060405180910390fd5b6060600167ffffffffffffffff81118015610f8b57600080fd5b50604051908082528060200260200182016040528015610fba5781602001602082028036833780820191505090505b50905060608582600081518110610fcd57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061100f611fef565b6040518060c00160405280601f60ff1681526020018773ffffffffffffffffffffffffffffffffffffffff168152602001838152602001600063ffffffff16815260200184815260200160001515815250905061106c8186611da7565b93505050509392505050565b61108133611c9f565b6110f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f796f75206d75737420626520676f7665726e6f7200000000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166320d154da82336040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b15801561119c57600080fd5b505af11580156111b0573d6000803e3d6000fd5b5050505050565b6111c033611c9f565b611232576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f796f75206d75737420626520676f7665726e6f7200000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663315ce5e28484336040518463ffffffff1660e01b815260040180848152602001831515151581526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b1580156112e957600080fd5b505af11580156112fd573d6000803e3d6000fd5b505050506040513d602081101561131357600080fd5b8101908080519060200190929190505050905061132e611fef565b60028260ff161415611c6c57600061134585611c72565b9050600360008681526020019081526020016000206040518060c00160405290816000820160009054906101000a900460ff1660ff1660ff1681526020016000820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820180548060200260200160405190810160405280929190818152602001828054801561144d57602002820191906000526020600020906000905b82829054906101000a900460ff1660ff16815260200190600101906020826000010492830192600103820291508084116114165790505b505050505081526020016002820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016003820180548060200260200160405190810160405280929190818152602001828054801561150157602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116114b7575b505050505081526020016004820160009054906101000a900460ff1615151515815250509150600b8160ff1614156116ee576000826060015163ffffffff161415611601573373ffffffffffffffffffffffffffffffffffffffff16826080015160008151811061156e57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415611600576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f596f752063616e206e6f742072656d6f766520796f757273656c66210000000081525060200191505060405180910390fd5b5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f437695a836080015160008151811061164f57fe5b602002602001015184606001516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018263ffffffff1663ffffffff16815260200192505050600060405180830381600087803b1580156116d157600080fd5b505af11580156116e5573d6000803e3d6000fd5b50505050611c6a565b600c8160ff1614156117cf576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166399bc9c1b836040015160008151811061174857fe5b6020026020010151846040015160018151811061176157fe5b60200260200101516040518363ffffffff1660e01b8152600401808360ff1660ff1681526020018260ff1660ff16815260200192505050600060405180830381600087803b1580156117b257600080fd5b505af11580156117c6573d6000803e3d6000fd5b50505050611c69565b60158160ff1614156118af57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663bb0aa40c836040015160008151811061182a57fe5b60200260200101516040518263ffffffff1660e01b8152600401808260ff1660ff168152602001915050602060405180830381600087803b15801561186e57600080fd5b505af1158015611882573d6000803e3d6000fd5b505050506040513d602081101561189857600080fd5b810190808051906020019092919050505050611c68565b60168160ff161415611aba578160a00151156119bf57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166361548099836080015160008151811061191457fe5b60200260200101516040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561197e57600080fd5b505af1158015611992573d6000803e3d6000fd5b505050506040513d60208110156119a857600080fd5b810190808051906020019092919050505050611ab5565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166356bd70848360800151600081518110611a0e57fe5b60200260200101516040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015611a7857600080fd5b505af1158015611a8c573d6000803e3d6000fd5b505050506040513d6020811015611aa257600080fd5b8101908080519060200190929190505050505b611c67565b601f8160ff161415611bf857600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c53057b483602001518460800151600081518110611b1a57fe5b60200260200101516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b158015611bb757600080fd5b505af1158015611bcb573d6000803e3d6000fd5b505050506040513d6020811015611be157600080fd5b810190808051906020019092919050505050611c66565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f766f74652074797065206572726f722e0000000000000000000000000000000081525060200191505060405180910390fd5b5b5b5b5b505b50505050565b60006003600083815260200190815260200160002060000160009054906101000a900460ff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e43581b8836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611d3f57600080fd5b505afa158015611d53573d6000803e3d6000fd5b505050506040513d6020811015611d6957600080fd5b81019080805190602001909291905050509050919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632c3956fe3386600001518760200151876040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018460ff1660ff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001945050505050602060405180830381600087803b158015611e9d57600080fd5b505af1158015611eb1573d6000803e3d6000fd5b505050506040513d6020811015611ec757600080fd5b81019080805190602001909291905050509050836003600083815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816001019080519060200190611f72929190612046565b5060608201518160020160006101000a81548163ffffffff021916908363ffffffff1602179055506080820151816003019080519060200190611fb69291906120ed565b5060a08201518160040160006101000a81548160ff021916908315150217905550905050611fe58160016111b7565b8091505092915050565b6040518060c00160405280600060ff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160608152602001600063ffffffff168152602001606081526020016000151581525090565b82805482825590600052602060002090601f016020900481019282156120dc5791602002820160005b838211156120ad57835183826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030261206f565b80156120da5782816101000a81549060ff02191690556001016020816000010492830192600103026120ad565b505b5090506120e99190612177565b5090565b828054828255906000526020600020908101928215612166579160200282015b828111156121655782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509160200191906001019061210d565b5b50905061217391906121a7565b5090565b6121a491905b808211156121a057600081816101000a81549060ff02191690555060010161217d565b5090565b90565b6121e791905b808211156121e357600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055506001016121ad565b5090565b9056fe7468652063757272656e74206465706c6f7920617574682074797065206973207468652073616d6520617320796f752077616e7420746f20736574696e76616c69642072616e6765206f662070617274696369706174657352617465746865206163636f756e7420686173206265656e207468652061646d696e206f6620636f6e637572727420636f6e74726163742ea2646970667358221220584d0fe60f29bac4c9a0aa7b57edfa86038e08433c4a4d18cb0ed07818bcf67864736f6c634300060a003360806040523480156200001157600080fd5b5060405162001f1938038062001f19833981810160405260808110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660208202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015620000c6578082015181840152602081019050620000a9565b5050505090500160405260200180516040519392919084640100000000821115620000f057600080fd5b838201915060208201858111156200010757600080fd5b82518660208202830111640100000000821117156200012557600080fd5b8083526020830192505050908051906020019060200280838360005b838110156200015e57808201518184015260208101905062000141565b505050509050016040526020018051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008090505b84518163ffffffff1610156200022c576200021e858263ffffffff1681518110620001ef57fe5b6020026020010151858363ffffffff16815181106200020a57fe5b60200260200101516200027e60201b60201c565b8080600101915050620001c8565b5080600460016101000a81548160ff021916908360ff16021790555081600460006101000a81548160ff021916908360ff16021790555062000274336200052c60201b60201c565b5050505062000ac6565b6200028f33620005f360201b60201c565b62000302576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008163ffffffff16141562000428573273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620003b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f596f752063616e206e6f742072656d6f766520796f757273656c66210000000081525060200191505060405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549063ffffffff0219169055620004228260016200069e60201b62000e1c1790919060201c565b62000528565b62000443826001620008cf60201b620010401790919060201c565b15620004ad5780600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff16021790555062000527565b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550620005268260016200091e60201b6200108f1790919060201c565b5b5b5050565b6200053d33620005f360201b60201c565b620005b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000634576001905062000699565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000694576001905062000699565b600090505b919050565b620006b08282620008cf60201b60201c565b62000707576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018062001ed56023913960400191505060405180910390fd5b600060018360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205403905060006001846001018054905003905060008460010182815481106200077157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080856001018481548110620007af57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600183018560000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508460000160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009055846001018054806200089357fe5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590555050505050565b6000808360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620009a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018062001ef86021913960400191505060405180910390fd5b620009b88282620008cf60201b60201c565b1562000a10576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f81526020018062001ea6602f913960400191505060405180910390fd5b81600101819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600101805490508260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b6113d08062000ad66000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063ac6c525111610071578063ac6c52511461045e578063b2bdfa7b146104c2578063b6fd90671461050c578063cd5d211814610530578063e43581b81461058c578063f437695a146105e8576100b4565b806313af4035146100b957806353bfcf2f146100fd5780635615696f146102635780635e77fe2014610287578063965b9ff11461034857806399bc9c1b14610420575b600080fd5b6100fb600480360360208110156100cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061063c565b005b6102476004803603604081101561011357600080fd5b810190808035906020019064010000000081111561013057600080fd5b82018360208201111561014257600080fd5b8035906020019184602083028401116401000000008311171561016457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156101c457600080fd5b8201836020820111156101d657600080fd5b803590602001918460208302840111640100000000831117156101f857600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506106fa565b604051808260ff1660ff16815260200191505060405180910390f35b61026b6107a8565b604051808260ff1660ff16815260200191505060405180910390f35b61028f6107bb565b604051808560ff1660ff1681526020018460ff1660ff1681526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156102ee5780820151818401526020810190506102d3565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610330578082015181840152602081019050610315565b50505050905001965050505050505060405180910390f35b6103fe6004803603602081101561035e57600080fd5b810190808035906020019064010000000081111561037b57600080fd5b82018360208201111561038d57600080fd5b803590602001918460208302840111640100000000831117156103af57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506108e7565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b61045c6004803603604081101561043657600080fd5b81019080803560ff169060200190929190803560ff169060200190929190505050610987565b005b6104a06004803603602081101561047457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a3c565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b6104ca610a95565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610514610aba565b604051808260ff1660ff16815260200191505060405180910390f35b6105726004803603602081101561054657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610acd565b604051808215151515815260200191505060405180910390f35b6105ce600480360360208110156105a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b74565b604051808215151515815260200191505060405180910390f35b61063a600480360360408110156105fe57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803563ffffffff169060200190929190505050610b91565b005b61064533610acd565b6106b7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080610706846108e7565b90506000610713846108e7565b82019050600061072b610726600161122b565b6108e7565b9050600460009054906101000a900460ff1660ff16810263ffffffff166064830263ffffffff16101561076457600193505050506107a2565b81600460019054906101000a900460ff1660ff160263ffffffff166064840263ffffffff161061079a57600293505050506107a2565b600393505050505b92915050565b600460009054906101000a900460ff1681565b6000806060806107cb600161122b565b9150815167ffffffffffffffff811180156107e557600080fd5b506040519080825280602002602001820160405280156108145781602001602082028036833780820191505090505b50905060008090505b82518110156108bc576003600084838151811061083657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1682828151811061089557fe5b602002602001019063ffffffff16908163ffffffff1681525050808060010191505061081d565b50600460019054906101000a900460ff169250600460009054906101000a900460ff16935090919293565b6000806000905060008090505b83518163ffffffff16101561097d5760036000858363ffffffff168151811061091957fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff168201915080806001019150506108f4565b5080915050919050565b61099033610acd565b610a02576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600460016101000a81548160ff021916908360ff16021790555081600460006101000a81548160ff021916908360ff1602179055505050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff169050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600460019054906101000a900460ff1681565b60003073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b0c5760019050610b6f565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b6a5760019050610b6f565b600090505b919050565b6000610b8a82600161104090919063ffffffff16565b9050919050565b610b9a33610acd565b610c0c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008163ffffffff161415610d28573273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610cbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f596f752063616e206e6f742072656d6f766520796f757273656c66210000000081525060200191505060405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549063ffffffff0219169055610d23826001610e1c90919063ffffffff16565b610e18565b610d3c82600161104090919063ffffffff16565b15610da45780600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550610e17565b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550610e1682600161108f90919063ffffffff16565b5b5b5050565b610e268282611040565b610e7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806113576023913960400191505060405180910390fd5b600060018360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540390506000600184600101805490500390506000846001018281548110610ee457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080856001018481548110610f2157fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600183018560000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508460000160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600090558460010180548061100457fe5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590555050505050565b6000808360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611115576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061137a6021913960400191505060405180910390fd5b61111f8282611040565b15611175576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180611328602f913960400191505060405180910390fd5b81600101819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600101805490508260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b606080826001018054905067ffffffffffffffff8111801561124c57600080fd5b5060405190808252806020026020018201604052801561127b5781602001602082028036833780820191505090505b50905060005b836001018054905081101561131d5783600101818154811061129f57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168282815181106112d657fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080600101915050611281565b508091505091905056fe4c6962416464726573735365743a2076616c756520616c72656164792065786973747320696e20746865207365742e4c6962416464726573735365743a2076616c756520646f65736e27742065786973742e4c6962416464726573735365743a2076616c75652063616e277420626520307830a2646970667358221220653fe7f94253fb0f4036ac4e9670026f7cbff40e05fd90051aa680babb0e0e7c64736f6c634300060a00334c6962416464726573735365743a2076616c756520616c72656164792065786973747320696e20746865207365742e4c6962416464726573735365743a2076616c756520646f65736e27742065786973742e4c6962416464726573735365743a2076616c75652063616e27742062652030783060806040523480156200001157600080fd5b5060405162001e5f38038062001e5f833981810160405260408110156200003757600080fd5b810190808051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000a382620000ec60201b60201c565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506200025e565b620000fd33620001b360201b60201c565b62000170576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620001f4576001905062000259565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000254576001905062000259565b600090505b919050565b611bf1806200026e6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063315ce5e21161008c5780636f2904cc116100665780636f2904cc146104ea578063b2bdfa7b14610508578063bc903cb814610552578063cd5d2118146106a4576100ea565b8063315ce5e2146103c9578063401853b71461043d5780636d23cd5814610485576100ea565b806319dcd07e116100c857806319dcd07e1461023f5780631cc05cbc1461028757806320d154da146102ec5780632c3956fe1461033a576100ea565b80630a494840146100ef57806313af4035146101b1578063185c1587146101f5575b600080fd5b61011b6004803603602081101561010557600080fd5b8101908080359060200190929190505050610700565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018460ff1660ff1681526020018381526020018260ff1660ff1681526020019550505050505060405180910390f35b6101f3600480360360208110156101c757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610790565b005b6101fd61084e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61026b6004803603602081101561025557600080fd5b8101908080359060200190929190505050610874565b604051808260ff1660ff16815260200191505060405180910390f35b6102d66004803603604081101561029d57600080fd5b81019080803560ff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610999565b6040518082815260200191505060405180910390f35b6103386004803603604081101561030257600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109be565b005b6103b36004803603608081101561035057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b9c565b6040518082815260200191505060405180910390f35b610421600480360360608110156103df57600080fd5b8101908080359060200190929190803515159060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f6f565b604051808260ff1660ff16815260200191505060405180910390f35b6104696004803603602081101561045357600080fd5b810190808035906020019092919050505061167b565b604051808260ff1660ff16815260200191505060405180910390f35b6104d46004803603604081101561049b57600080fd5b81019080803560ff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116a8565b6040518082815260200191505060405180910390f35b6104f2611709565b6040518082815260200191505060405180910390f35b61051061170f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61057e6004803603602081101561056857600080fd5b8101908080359060200190929190505050611734565b604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018660ff1660ff1681526020018581526020018460ff1660ff1681526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561064757808201518184015260208101905061062c565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561068957808201518184015260208101905061066e565b50505050905001995050505050505050505060405180910390f35b6106e6600480360360208110156106ba57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118f5565b604051808215151515815260200191505060405180910390f35b60036020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160149054906101000a900460ff16908060020154908060030160009054906101000a900460ff16905085565b610799336118f5565b61080b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008160006003600083815260200190815260200160002060030160009054906101000a900460ff1660ff161415610914576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f50726f706f73616c206e6f74206578697374000000000000000000000000000081525060200191505060405180910390fd5b600060036000858152602001908152602001600020905060018160030160009054906101000a900460ff1660ff16141561097d57806002015443111561097c5760058160030160006101000a81548160ff021916908360ff1602179055506005925050610993565b5b8060030160009054906101000a900460ff169250505b50919050565b6004602052816000526040600020602052806000526040600020600091509150505481565b6109c7336118f5565b610a39576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b60006003600084815260200190815260200160002090506001610a5b84610874565b60ff1614610ab4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611b92602a913960400191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b79576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4f6e6c792070726f706f7365722063616e207265766f6b65000000000000000081525060200191505060405180910390fd5b60048160030160006101000a81548160ff021916908360ff160217905550505050565b6000610ba7336118f5565b610c19576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600460008660ff1660ff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060016003600083815260200190815260200160002060030160009054906101000a900460ff1660ff161415610cae57610cac81610874565b505b60016003600083815260200190815260200160002060030160009054906101000a900460ff1660ff161415610d4b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f43757272656e742070726f706f73616c206e6f7420656e64000000000000000081525060200191505060405180910390fd5b60026000815480929190600101919050555060006002549050606080610d6f611a55565b6040518060e001604052808973ffffffffffffffffffffffffffffffffffffffff1681526020018b73ffffffffffffffffffffffffffffffffffffffff1681526020018a60ff1681526020018843018152602001600160ff168152602001848152602001838152509050806003600086815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160146101000a81548160ff021916908360ff1602179055506060820151816002015560808201518160030160006101000a81548160ff021916908360ff16021790555060a0820151816004019080519060200190610ee3929190611ac4565b5060c0820151816005019080519060200190610f00929190611ac4565b5090505083600460008b60ff1660ff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508395505050505050949350505050565b6000610f7a336118f5565b610fec576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b8360006003600083815260200190815260200160002060030160009054906101000a900460ff1660ff16141561108a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f50726f706f73616c206e6f74206578697374000000000000000000000000000081525060200191505060405180910390fd5b8460016003600083815260200190815260200160002060030160009054906101000a900460ff1660ff1614611127576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f50726f706f73616c206973206e6f7420766f7461626c6500000000000000000081525060200191505060405180910390fd5b600060036000888152602001908152602001600020905061135f816040518060e00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160149054906101000a900460ff1660ff1660ff168152602001600282015481526020016003820160009054906101000a900460ff1660ff1660ff168152602001600482018054806020026020016040519081016040528092919081815260200182805480156112c257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611278575b505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801561135057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611306575b5050505050815250508661199c565b156113d2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f416c726561647920766f7465640000000000000000000000000000000000000081525060200191505060405180910390fd5b85156114425780600401859080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506114a8565b80600501859080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166353bfcf2f83600401846005016040518363ffffffff1660e01b8152600401808060200180602001838103835285818154815260200191508054801561157e57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611534575b505083810382528481815481526020019150805480156115f357602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116115a9575b505094505050505060206040518083038186803b15801561161357600080fd5b505afa158015611627573d6000803e3d6000fd5b505050506040513d602081101561163d57600080fd5b81019080805190602001909291905050509050808260030160006101000a81548160ff021916908360ff160217905550809450505050509392505050565b60006003600083815260200190815260200160002060030160009054906101000a900460ff169050919050565b6000600460008460ff1660ff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60025481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060008060006060806000600360008a815260200190815260200160002090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1697508060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1696508060010160149054906101000a900460ff169550806002015494508060030160009054906101000a900460ff1693508060040180548060200260200160405190810160405280929190818152602001828054801561185757602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161180d575b50505050509250806005018054806020026020016040519081016040528092919081815260200182805480156118e257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611898575b5050505050915050919395979092949650565b60003073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156119345760019050611997565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156119925760019050611997565b600090505b919050565b60006119ac8360a00151836119da565b806119c157506119c08360c00151836119da565b5b156119cf57600190506119d4565b600090505b92915050565b600080600090505b8351811015611a49578381815181106119f757fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a3c576001915050611a4f565b80806001019150506119e2565b50600090505b92915050565b6040518060e00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600060ff16815260200160008152602001600060ff16815260200160608152602001606081525090565b828054828255906000526020600020908101928215611b3d579160200282015b82811115611b3c5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190611ae4565b5b509050611b4a9190611b4e565b5090565b611b8e91905b80821115611b8a57600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101611b54565b5090565b9056fe4f6e6c79206e65776c7920637265617465642070726f706f73616c2063616e206265207265766f6b6564a26469706673582212202fc7334d6cb6c820a68299bbafef322c93ab9cb4c38c3e79e96e85fe66232ac564736f6c634300060a0033";
static const char* committeeSmBin = "60806040523480156200001157600080fd5b506040516200643a3803806200643a833981810160405260808110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660208202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015620000c6578082015181840152602081019050620000a9565b5050505090500160405260200180516040519392919084640100000000821115620000f057600080fd5b838201915060208201858111156200010757600080fd5b82518660208202830111640100000000821117156200012557600080fd5b8083526020830192505050908051906020019060200280838360005b838110156200015e57808201518184015260208101905062000141565b505050509050016040526020018051906020019092919080519060200190929190505050611005600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083838383604051620001d790620003e7565b8080602001806020018560ff1660ff1681526020018460ff1660ff168152602001838103835287818151815260200191508051906020019060200280838360005b838110156200023557808201518184015260208101905062000218565b50505050905001838103825286818151815260200191508051906020019060200280838360005b83811015620002795780820151818401526020810190506200025c565b505050509050019650505050505050604051809103906000f080158015620002a5573d6000803e3d6000fd5b506000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550306000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516200031690620003f5565b808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050604051809103906000f0801580156200039c573d6000803e3d6000fd5b50600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505062000403565b611f1980620026c283390190565b611e5f80620045db83390190565b6122af80620004136000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c8063b5f2323511610071578063b5f23235146102bf578063ba2de76c1461031b578063cbca676d14610349578063d2944439146103a5578063de00335614610417578063f9e87e5114610466576100b4565b80630cb0a8d9146100b95780635b5cc7361461012757806368baf8bd146101615780637bc85516146101ab578063869328ad146101f5578063922b79061461023d575b600080fd5b610111600480360360608110156100cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190803590602001909291905050506104b0565b6040518082815260200191505060405180910390f35b61015f6004803603604081101561013d57600080fd5b8101908080359060200190929190803515159060200190929190505050610633565b005b6101696110ee565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101b3611114565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102216004803603602081101561020b57600080fd5b8101908080359060200190929190505050611139565b604051808260ff1660ff16815260200191505060405180910390f35b6102a96004803603606081101561025357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611166565b6040518082815260200191505060405180910390f35b610301600480360360208110156102d557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114ea565b604051808215151515815260200191505060405180910390f35b6103476004803603602081101561033157600080fd5b81019080803590602001909291905050506115cc565b005b61038f6004803603606081101561035f57600080fd5b81019080803560ff169060200190929190803560ff1690602001909291908035906020019092919050505061170b565b6040518082815260200191505060405180910390f35b610401600480360360608110156103bb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803563ffffffff16906020019092919080359060200190929190505050611981565b6040518082815260200191505060405180910390f35b6104506004803603604081101561042d57600080fd5b81019080803560ff16906020019092919080359060200190929190505050611b04565b6040518082815260200191505060405180910390f35b61046e611d80565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60006104bb336114ea565b61052d576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f796f75206d75737420626520676f7665726e6f7200000000000000000000000081525060200191505060405180910390fd5b6060600167ffffffffffffffff8111801561054757600080fd5b506040519080825280602002602001820160405280156105765781602001602082028036833780820191505090505b509050848160008151811061058757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060606105cb611fee565b6040518060c00160405280601660ff1681526020018873ffffffffffffffffffffffffffffffffffffffff168152602001838152602001600063ffffffff16815260200184815260200187151581525090506106278186611da6565b93505050509392505050565b61063c336114ea565b6106ae576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f796f75206d75737420626520676f7665726e6f7200000000000000000000000081525060200191505060405180910390fd5b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166368b739c98484336040518463ffffffff1660e01b815260040180848152602001831515151581526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b15801561076557600080fd5b505af1158015610779573d6000803e3d6000fd5b505050506040513d602081101561078f57600080fd5b810190808051906020019092919050505090506107aa611fee565b60028260ff1614156110e85760006107c185611139565b9050600360008681526020019081526020016000206040518060c00160405290816000820160009054906101000a900460ff1660ff1660ff1681526020016000820160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001600182018054806020026020016040519081016040528092919081815260200182805480156108c957602002820191906000526020600020906000905b82829054906101000a900460ff1660ff16815260200190600101906020826000010492830192600103820291508084116108925790505b505050505081526020016002820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016003820180548060200260200160405190810160405280929190818152602001828054801561097d57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610933575b505050505081526020016004820160009054906101000a900460ff1615151515815250509150600b8160ff161415610b6a576000826060015163ffffffff161415610a7d573373ffffffffffffffffffffffffffffffffffffffff1682608001516000815181106109ea57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff161415610a7c576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f596f752063616e206e6f742072656d6f766520796f757273656c66210000000081525060200191505060405180910390fd5b5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16639067531d8360800151600081518110610acb57fe5b602002602001015184606001516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018263ffffffff1663ffffffff16815260200192505050600060405180830381600087803b158015610b4d57600080fd5b505af1158015610b61573d6000803e3d6000fd5b505050506110e6565b600c8160ff161415610c4b576000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166358dd53d98360400151600081518110610bc457fe5b60200260200101518460400151600181518110610bdd57fe5b60200260200101516040518363ffffffff1660e01b8152600401808360ff1660ff1681526020018260ff1660ff16815260200192505050600060405180830381600087803b158015610c2e57600080fd5b505af1158015610c42573d6000803e3d6000fd5b505050506110e5565b60158160ff161415610d2b57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b0ca889b8360400151600081518110610ca657fe5b60200260200101516040518263ffffffff1660e01b8152600401808260ff1660ff168152602001915050602060405180830381600087803b158015610cea57600080fd5b505af1158015610cfe573d6000803e3d6000fd5b505050506040513d6020811015610d1457600080fd5b8101908080519060200190929190505050506110e4565b60168160ff161415610f36578160a0015115610e3b57600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663026a22fd8360800151600081518110610d9057fe5b60200260200101516040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610dfa57600080fd5b505af1158015610e0e573d6000803e3d6000fd5b505050506040513d6020811015610e2457600080fd5b810190808051906020019092919050505050610f31565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631a2052518360800151600081518110610e8a57fe5b60200260200101516040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610ef457600080fd5b505af1158015610f08573d6000803e3d6000fd5b505050506040513d6020811015610f1e57600080fd5b8101908080519060200190929190505050505b6110e3565b601f8160ff16141561107457600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166302b3703b83602001518460800151600081518110610f9657fe5b60200260200101516040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561103357600080fd5b505af1158015611047573d6000803e3d6000fd5b505050506040513d602081101561105d57600080fd5b8101908080519060200190929190505050506110e2565b6040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f766f74652074797065206572726f722e0000000000000000000000000000000081525060200191505060405180910390fd5b5b5b5b5b505b50505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60006003600083815260200190815260200160002060000160009054906101000a900460ff169050919050565b6000611171336114ea565b6111e3576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f796f75206d75737420626520676f7665726e6f7200000000000000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611286576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f636f6e747261637420616464726573206e6f74206578697374732e000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16622e8d78846040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561132457600080fd5b505afa158015611338573d6000803e3d6000fd5b505050506040513d602081101561134e57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156113e3576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252603481526020018061220b6034913960400191505060405180910390fd5b6060600167ffffffffffffffff811180156113fd57600080fd5b5060405190808252806020026020018201604052801561142c5781602001602082028036833780820191505090505b5090506060858260008151811061143f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611481611fee565b6040518060c00160405280601f60ff1681526020018773ffffffffffffffffffffffffffffffffffffffff168152602001838152602001600063ffffffff1681526020018481526020016000151581525090506114de8186611da6565b93505050509392505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b5f23235836040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561158a57600080fd5b505afa15801561159e573d6000803e3d6000fd5b505050506040513d60208110156115b457600080fd5b81019080805190602001909291905050509050919050565b6115d5336114ea565b611647576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f796f75206d75737420626520676f7665726e6f7200000000000000000000000081525060200191505060405180910390fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166394d8f86f82336040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050600060405180830381600087803b1580156116f057600080fd5b505af1158015611704573d6000803e3d6000fd5b5050505050565b6000611716336114ea565b611788576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f796f75206d75737420626520676f7665726e6f7200000000000000000000000081525060200191505060405180910390fd5b60008460ff16101580156117a0575060648460ff1611155b6117f5576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806121ea6021913960400191505060405180910390fd5b60008360ff161015801561180d575060648360ff1611155b61187f576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f696e76616c69642072616e6765206f662077696e52617465000000000000000081525060200191505060405180910390fd5b606080600267ffffffffffffffff8111801561189a57600080fd5b506040519080825280602002602001820160405280156118c95781602001602082028036833780820191505090505b50905085816000815181106118da57fe5b602002602001019060ff16908160ff168152505084816001815181106118fc57fe5b602002602001019060ff16908160ff1681525050611918611fee565b6040518060c00160405280600c60ff1681526020013073ffffffffffffffffffffffffffffffffffffffff168152602001838152602001600063ffffffff1681526020018481526020016000151581525090506119758186611da6565b93505050509392505050565b600061198c336114ea565b6119fe576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f796f75206d75737420626520676f7665726e6f7200000000000000000000000081525060200191505060405180910390fd5b6060600167ffffffffffffffff81118015611a1857600080fd5b50604051908082528060200260200182016040528015611a475781602001602082028036833780820191505090505b50905060608582600081518110611a5a57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611a9c611fee565b6040518060c00160405280600b60ff1681526020018873ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018763ffffffff168152602001848152602001600115158152509050611af88186611da6565b93505050509392505050565b6000611b0f336114ea565b611b81576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f796f75206d75737420626520676f7665726e6f7200000000000000000000000081525060200191505060405180910390fd5b8260ff16600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663598ab5966040518163ffffffff1660e01b815260040160206040518083038186803b158015611bed57600080fd5b505afa158015611c01573d6000803e3d6000fd5b505050506040513d6020811015611c1757600080fd5b81019080805190602001909291905050501415611c7f576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018061223f603b913960400191505060405180910390fd5b606080600167ffffffffffffffff81118015611c9a57600080fd5b50604051908082528060200260200182016040528015611cc95781602001602082028036833780820191505090505b5090508481600081518110611cda57fe5b602002602001019060ff16908160ff1681525050611cf6611fee565b6040518060c00160405280601560ff168152602001600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001600063ffffffff168152602001848152602001600015158152509050611d758186611da6565b935050505092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16633946f7463386600001518760200151876040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018460ff1660ff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001945050505050602060405180830381600087803b158015611e9c57600080fd5b505af1158015611eb0573d6000803e3d6000fd5b505050506040513d6020811015611ec657600080fd5b81019080805190602001909291905050509050836003600083815260200190815260200160002060008201518160000160006101000a81548160ff021916908360ff16021790555060208201518160000160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816001019080519060200190611f71929190612045565b5060608201518160020160006101000a81548163ffffffff021916908363ffffffff1602179055506080820151816003019080519060200190611fb59291906120ec565b5060a08201518160040160006101000a81548160ff021916908315150217905550905050611fe4816001610633565b8091505092915050565b6040518060c00160405280600060ff168152602001600073ffffffffffffffffffffffffffffffffffffffff16815260200160608152602001600063ffffffff168152602001606081526020016000151581525090565b82805482825590600052602060002090601f016020900481019282156120db5791602002820160005b838211156120ac57835183826101000a81548160ff021916908360ff160217905550926020019260010160208160000104928301926001030261206e565b80156120d95782816101000a81549060ff02191690556001016020816000010492830192600103026120ac565b505b5090506120e89190612176565b5090565b828054828255906000526020600020908101928215612165579160200282015b828111156121645782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509160200191906001019061210c565b5b50905061217291906121a6565b5090565b6121a391905b8082111561219f57600081816101000a81549060ff02191690555060010161217c565b5090565b90565b6121e691905b808211156121e257600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff0219169055506001016121ac565b5090565b9056fe696e76616c69642072616e6765206f662070617274696369706174657352617465746865206163636f756e7420686173206265656e207468652061646d696e206f6620636f6e637572727420636f6e74726163742e7468652063757272656e74206465706c6f7920617574682074797065206973207468652073616d6520617320796f752077616e7420746f20736574a264697066735822122091d045f10d4f135de798b06a29a04a528f9b2f7cf439e0db02abb4a2dbbf8c2c64736f6c634300060a003360806040523480156200001157600080fd5b5060405162001f1938038062001f19833981810160405260808110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b838201915060208201858111156200006f57600080fd5b82518660208202830111640100000000821117156200008d57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015620000c6578082015181840152602081019050620000a9565b5050505090500160405260200180516040519392919084640100000000821115620000f057600080fd5b838201915060208201858111156200010757600080fd5b82518660208202830111640100000000821117156200012557600080fd5b8083526020830192505050908051906020019060200280838360005b838110156200015e57808201518184015260208101905062000141565b505050509050016040526020018051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008090505b84518163ffffffff1610156200022c576200021e858263ffffffff1681518110620001ef57fe5b6020026020010151858363ffffffff16815181106200020a57fe5b60200260200101516200027e60201b60201c565b8080600101915050620001c8565b5080600460016101000a81548160ff021916908360ff16021790555081600460006101000a81548160ff021916908360ff16021790555062000274336200052c60201b60201c565b5050505062000ac6565b6200028f33620005f360201b60201c565b62000302576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008163ffffffff16141562000428573273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620003b5576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f596f752063616e206e6f742072656d6f766520796f757273656c66210000000081525060200191505060405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549063ffffffff0219169055620004228260016200069e60201b62000e1c1790919060201c565b62000528565b62000443826001620008cf60201b620010401790919060201c565b15620004ad5780600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff16021790555062000527565b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550620005268260016200091e60201b6200108f1790919060201c565b5b5b5050565b6200053d33620005f360201b60201c565b620005b0576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000634576001905062000699565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000694576001905062000699565b600090505b919050565b620006b08282620008cf60201b60201c565b62000707576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018062001ef66023913960400191505060405180910390fd5b600060018360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205403905060006001846001018054905003905060008460010182815481106200077157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080856001018481548110620007af57fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600183018560000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508460000160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009055846001018054806200089357fe5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590555050505050565b6000808360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415620009a6576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018062001ed56021913960400191505060405180910390fd5b620009b88282620008cf60201b60201c565b1562000a10576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f81526020018062001ea6602f913960400191505060405180910390fd5b81600101819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600101805490508260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b6113d08062000ad66000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c80636e0376d4116100715780636e0376d4146102a5578063749280c7146103015780638e2b0950146103c25780639067531d14610528578063b5f232351461057c578063c77695e4146105d8576100b4565b806305282c70146100b957806307f44999146100fd5780630e878ed01461012157806323bdace11461014557806328e914891461021d57806358dd53d914610267575b600080fd5b6100fb600480360360208110156100cf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061063c565b005b6101056106fa565b604051808260ff1660ff16815260200191505060405180910390f35b61012961070d565b604051808260ff1660ff16815260200191505060405180910390f35b6101fb6004803603602081101561015b57600080fd5b810190808035906020019064010000000081111561017857600080fd5b82018360208201111561018a57600080fd5b803590602001918460208302840111640100000000831117156101ac57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610720565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b6102256107c0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102a36004803603604081101561027d57600080fd5b81019080803560ff169060200190929190803560ff1690602001909291905050506107e5565b005b6102e7600480360360208110156102bb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061089a565b604051808215151515815260200191505060405180910390f35b610309610941565b604051808560ff1660ff1681526020018460ff1660ff1681526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561036857808201518184015260208101905061034d565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156103aa57808201518184015260208101905061038f565b50505050905001965050505050505060405180910390f35b61050c600480360360408110156103d857600080fd5b81019080803590602001906401000000008111156103f557600080fd5b82018360208201111561040757600080fd5b8035906020019184602083028401116401000000008311171561042957600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561048957600080fd5b82018360208201111561049b57600080fd5b803590602001918460208302840111640100000000831117156104bd57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610a6d565b604051808260ff1660ff16815260200191505060405180910390f35b61057a6004803603604081101561053e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803563ffffffff169060200190929190505050610b1b565b005b6105be6004803603602081101561059257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610da6565b604051808215151515815260200191505060405180910390f35b61061a600480360360208110156105ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dc3565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b6106453361089a565b6106b7576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460019054906101000a900460ff1681565b600460009054906101000a900460ff1681565b6000806000905060008090505b83518163ffffffff1610156107b65760036000858363ffffffff168151811061075257fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1682019150808060010191505061072d565b5080915050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6107ee3361089a565b610860576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600460016101000a81548160ff021916908360ff16021790555081600460006101000a81548160ff021916908360ff1602179055505050565b60003073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156108d9576001905061093c565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610937576001905061093c565b600090505b919050565b600080606080610951600161122b565b9150815167ffffffffffffffff8111801561096b57600080fd5b5060405190808252806020026020018201604052801561099a5781602001602082028036833780820191505090505b50905060008090505b8251811015610a4257600360008483815181106109bc57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16828281518110610a1b57fe5b602002602001019063ffffffff16908163ffffffff168152505080806001019150506109a3565b50600460019054906101000a900460ff169250600460009054906101000a900460ff16935090919293565b600080610a7984610720565b90506000610a8684610720565b820190506000610a9e610a99600161122b565b610720565b9050600460009054906101000a900460ff1660ff16810263ffffffff166064830263ffffffff161015610ad75760019350505050610b15565b81600460019054906101000a900460ff1660ff160263ffffffff166064840263ffffffff1610610b0d5760029350505050610b15565b600393505050505b92915050565b610b243361089a565b610b96576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b60008163ffffffff161415610cb2573273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c47576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f596f752063616e206e6f742072656d6f766520796f757273656c66210000000081525060200191505060405180910390fd5b600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81549063ffffffff0219169055610cad826001610e1c90919063ffffffff16565b610da2565b610cc682600161104090919063ffffffff16565b15610d2e5780600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550610da1565b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff160217905550610da082600161108f90919063ffffffff16565b5b5b5050565b6000610dbc82600161104090919063ffffffff16565b9050919050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff169050919050565b610e268282611040565b610e7b576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806113786023913960400191505060405180910390fd5b600060018360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540390506000600184600101805490500390506000846001018281548110610ee457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905080856001018481548110610f2157fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600183018560000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508460000160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600090558460010180548061100457fe5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590555050505050565b6000808360000160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611115576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806113576021913960400191505060405180910390fd5b61111f8282611040565b15611175576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180611328602f913960400191505060405180910390fd5b81600101819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600101805490508260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b606080826001018054905067ffffffffffffffff8111801561124c57600080fd5b5060405190808252806020026020018201604052801561127b5781602001602082028036833780820191505090505b50905060005b836001018054905081101561131d5783600101818154811061129f57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168282815181106112d657fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080600101915050611281565b508091505091905056fe4c6962416464726573735365743a2076616c756520616c72656164792065786973747320696e20746865207365742e4c6962416464726573735365743a2076616c75652063616e2774206265203078304c6962416464726573735365743a2076616c756520646f65736e27742065786973742ea264697066735822122009edc2f5877d5b2cbb6c32b7d35710ba5d8cde63d65176e3832198cf3fd158cc64736f6c634300060a00334c6962416464726573735365743a2076616c756520616c72656164792065786973747320696e20746865207365742e4c6962416464726573735365743a2076616c75652063616e2774206265203078304c6962416464726573735365743a2076616c756520646f65736e27742065786973742e60806040523480156200001157600080fd5b5060405162001e5f38038062001e5f833981810160405260408110156200003757600080fd5b810190808051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550620000a382620000ec60201b60201c565b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050506200025e565b620000fd33620001b360201b60201c565b62000170576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60003073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415620001f4576001905062000259565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141562000254576001905062000259565b600090505b919050565b611bf1806200026e6000396000f3fe608060405234801561001057600080fd5b50600436106100ea5760003560e01c80637bc855161161008c57806394d8f86f1161006657806394d8f86f146104b3578063d47e52c214610501578063e59e7b3414610566578063ec846044146105ae576100ea565b80637bc85516146103bc57806386840d091461040657806389ebc3b71461046b576100ea565b80633946f746116100c85780633946f7461461023f57806362e7ec50146102ce57806368b739c9146102ec5780636e0376d414610360576100ea565b806302ad26cc146100ef57806305282c70146101b157806328e91489146101f5575b600080fd5b61011b6004803603602081101561010557600080fd5b8101908080359060200190929190505050610700565b604051808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018460ff1660ff1681526020018381526020018260ff1660ff1681526020019550505050505060405180910390f35b6101f3600480360360208110156101c757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610790565b005b6101fd61084e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102b86004803603608081101561025557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610873565b6040518082815260200191505060405180910390f35b6102d6610c46565b6040518082815260200191505060405180910390f35b6103446004803603606081101561030257600080fd5b8101908080359060200190929190803515159060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c4c565b604051808260ff1660ff16815260200191505060405180910390f35b6103a26004803603602081101561037657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611358565b604051808215151515815260200191505060405180910390f35b6103c46113ff565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104556004803603604081101561041c57600080fd5b81019080803560ff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611425565b6040518082815260200191505060405180910390f35b6104976004803603602081101561048157600080fd5b8101908080359060200190929190505050611486565b604051808260ff1660ff16815260200191505060405180910390f35b6104ff600480360360408110156104c957600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114b3565b005b6105506004803603604081101561051757600080fd5b81019080803560ff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611691565b6040518082815260200191505060405180910390f35b6105926004803603602081101561057c57600080fd5b81019080803590602001909291905050506116b6565b604051808260ff1660ff16815260200191505060405180910390f35b6105da600480360360208110156105c457600080fd5b81019080803590602001909291905050506117db565b604051808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018660ff1660ff1681526020018581526020018460ff1660ff1681526020018060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156106a3578082015181840152602081019050610688565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156106e55780820151818401526020810190506106ca565b50505050905001995050505050505050505060405180910390f35b60036020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160149054906101000a900460ff16908060020154908060030160009054906101000a900460ff16905085565b61079933611358565b61080b576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061087e33611358565b6108f0576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600460008660ff1660ff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060016003600083815260200190815260200160002060030160009054906101000a900460ff1660ff16141561098557610983816116b6565b505b60016003600083815260200190815260200160002060030160009054906101000a900460ff1660ff161415610a22576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f43757272656e742070726f706f73616c206e6f7420656e64000000000000000081525060200191505060405180910390fd5b60026000815480929190600101919050555060006002549050606080610a46611a55565b6040518060e001604052808973ffffffffffffffffffffffffffffffffffffffff1681526020018b73ffffffffffffffffffffffffffffffffffffffff1681526020018a60ff1681526020018843018152602001600160ff168152602001848152602001838152509050806003600086815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160010160146101000a81548160ff021916908360ff1602179055506060820151816002015560808201518160030160006101000a81548160ff021916908360ff16021790555060a0820151816004019080519060200190610bba929190611ac4565b5060c0820151816005019080519060200190610bd7929190611ac4565b5090505083600460008b60ff1660ff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508395505050505050949350505050565b60025481565b6000610c5733611358565b610cc9576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b8360006003600083815260200190815260200160002060030160009054906101000a900460ff1660ff161415610d67576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f50726f706f73616c206e6f74206578697374000000000000000000000000000081525060200191505060405180910390fd5b8460016003600083815260200190815260200160002060030160009054906101000a900460ff1660ff1614610e04576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f50726f706f73616c206973206e6f7420766f7461626c6500000000000000000081525060200191505060405180910390fd5b600060036000888152602001908152602001600020905061103c816040518060e00160405290816000820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016001820160149054906101000a900460ff1660ff1660ff168152602001600282015481526020016003820160009054906101000a900460ff1660ff1660ff16815260200160048201805480602002602001604051908101604052809291908181526020018280548015610f9f57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610f55575b505050505081526020016005820180548060200260200160405190810160405280929190818152602001828054801561102d57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610fe3575b5050505050815250508661199c565b156110af576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252600d8152602001807f416c726561647920766f7465640000000000000000000000000000000000000081525060200191505060405180910390fd5b851561111f5780600401859080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611185565b80600501859080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638e2b095083600401846005016040518363ffffffff1660e01b8152600401808060200180602001838103835285818154815260200191508054801561125b57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611211575b505083810382528481815481526020019150805480156112d057602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311611286575b505094505050505060206040518083038186803b1580156112f057600080fd5b505afa158015611304573d6000803e3d6000fd5b505050506040513d602081101561131a57600080fd5b81019080805190602001909291905050509050808260030160006101000a81548160ff021916908360ff160217905550809450505050509392505050565b60003073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561139757600190506113fa565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113f557600190506113fa565b600090505b919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600460008460ff1660ff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006003600083815260200190815260200160002060030160009054906101000a900460ff169050919050565b6114bc33611358565b61152e576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f4f6e6c79206f776e65722100000000000000000000000000000000000000000081525060200191505060405180910390fd5b60006003600084815260200190815260200160002090506001611550846116b6565b60ff16146115a9576040517fc703cb1200000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611b92602a913960400191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff168160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461166e576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260188152602001807f4f6e6c792070726f706f7365722063616e207265766f6b65000000000000000081525060200191505060405180910390fd5b60048160030160006101000a81548160ff021916908360ff160217905550505050565b6004602052816000526040600020602052806000526040600020600091509150505481565b60008160006003600083815260200190815260200160002060030160009054906101000a900460ff1660ff161415611756576040517fc703cb120000000000000000000000000000000000000000000000000000000081526004018080602001828103825260128152602001807f50726f706f73616c206e6f74206578697374000000000000000000000000000081525060200191505060405180910390fd5b600060036000858152602001908152602001600020905060018160030160009054906101000a900460ff1660ff1614156117bf5780600201544311156117be5760058160030160006101000a81548160ff021916908360ff16021790555060059250506117d5565b5b8060030160009054906101000a900460ff169250505b50919050565b60008060008060006060806000600360008a815260200190815260200160002090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1697508060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1696508060010160149054906101000a900460ff169550806002015494508060030160009054906101000a900460ff169350806004018054806020026020016040519081016040528092919081815260200182805480156118fe57602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116118b4575b505050505092508060050180548060200260200160405190810160405280929190818152602001828054801561198957602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001906001019080831161193f575b5050505050915050919395979092949650565b60006119ac8360a00151836119da565b806119c157506119c08360c00151836119da565b5b156119cf57600190506119d4565b600090505b92915050565b600080600090505b8351811015611a49578381815181106119f757fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a3c576001915050611a4f565b80806001019150506119e2565b50600090505b92915050565b6040518060e00160405280600073ffffffffffffffffffffffffffffffffffffffff168152602001600073ffffffffffffffffffffffffffffffffffffffff168152602001600060ff16815260200160008152602001600060ff16815260200160608152602001606081525090565b828054828255906000526020600020908101928215611b3d579160200282015b82811115611b3c5782518260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555091602001919060010190611ae4565b5b509050611b4a9190611b4e565b5090565b611b8e91905b80821115611b8a57600081816101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550600101611b54565b5090565b9056fe4f6e6c79206e65776c7920637265617465642070726f706f73616c2063616e206265207265766f6b6564a2646970667358221220e43d5ab2913b8a5097b90254ef5a183e7b77c5a26c31672d31e99df410e9387c64736f6c634300060a0033";
// clang-format on

class AuthInitializer
{
public:
    static void init(protocol::BlockNumber _number,
        const std::shared_ptr<ProtocolInitializer>& _protocol,
        const std::shared_ptr<NodeConfig>& _nodeConfig,
        const bcos::scheduler::SchedulerInterface::Ptr& _scheduler)
    {
        auto block = _protocol->blockFactory()->createBlock();
        block->blockHeader()->setNumber(_number);

        // hex bin code to bytes
        bytes code;
        boost::algorithm::unhex(
            _nodeConfig->smCryptoType() ? committeeSmBin : committeeBin, std::back_inserter(code));

        // constructor (address[] initGovernors,    = [authAdminAddress]
        //        uint32[] memory weights,          = [1]
        //        uint8 participatesRate,           = 0
        //        uint8 winRate)                    = 0
        std::vector<Address> initGovernors({Address(_nodeConfig->authAdminAddress())});
        std::vector<string32> weights({bcos::codec::toString32(h256(1))});
        INITIALIZER_LOG(DEBUG) << LOG_BADGE("AuthInitializer")
                               << LOG_KV("authAdminAddress", _nodeConfig->authAdminAddress());

        // bytes code + abi encode constructor params
        codec::abi::ContractABICodec abi(_protocol->cryptoSuite()->hashImpl());
        bytes input = code + abi.abiIn("", initGovernors, weights, codec::toString32(h256(0)),
                                 codec::toString32(h256(0)));

        auto tx = _protocol->blockFactory()->transactionFactory()->createTransaction(3,
            precompiled::AUTH_COMMITTEE_ADDRESS, input, u256(_number), 500, _nodeConfig->chainId(),
            _nodeConfig->groupId(), utcTime());
        block->appendTransaction(tx);

        std::promise<bcos::protocol::BlockHeader::Ptr> executedHeader;
        _scheduler->executeBlock(block, false,
            [&](bcos::Error::Ptr&& _error, bcos::protocol::BlockHeader::Ptr&& _header) {
                if (_error)
                {
                    INITIALIZER_LOG(ERROR) << LOG_BADGE("AuthInitializer")
                                           << LOG_KV("errorMsg", _error->errorMessage());
                    BOOST_THROW_EXCEPTION(
                        BCOS_ERROR(-1, "AuthInitializer: scheduler executeBlock error"));
                }
                INITIALIZER_LOG(DEBUG)
                    << LOG_BADGE("AuthInitializer") << LOG_DESC("scheduler execute block success!")
                    << LOG_KV("blockHash", block->blockHeader()->hash().hex());
                executedHeader.set_value(std::move(_header));
            });
        auto header = executedHeader.get_future().get();

        std::promise<bcos::ledger::LedgerConfig::Ptr> committedConfig;
        _scheduler->commitBlock(
            header, [&](Error::Ptr&& _error, bcos::ledger::LedgerConfig::Ptr&& _config) {
                if (_error)
                {
                    INITIALIZER_LOG(ERROR) << LOG_BADGE("AuthInitializer")
                                           << LOG_KV("errorMsg", _error->errorMessage());
                    BOOST_THROW_EXCEPTION(
                        BCOS_ERROR(-1, "AuthInitializer: scheduler commitBlock error"));
                }
                committedConfig.set_value(_config);
            });
        auto newConfig = committedConfig.get_future().get();
        if (newConfig->blockNumber() != _number)
        {
            INITIALIZER_LOG(ERROR) << LOG_BADGE("AuthInitializer") << LOG_DESC("");
            BOOST_THROW_EXCEPTION(BCOS_ERROR(-1, "AuthInitializer: blockNumber mismatch"));
        }
    }
};
}  // namespace bcos::initializer